package com.module.app.utils;

import android.content.Context;

import com.module.app.arouter.ArouterUtils;
import com.module.app.arouter.service.IMyService;
import com.module.app.bean.ConfigBean;
import com.module.app.widget.share.ShareLayoutType;
import com.module.app.widget.share.bean.Share;
import com.module.app.arouter.ArouterUtils;
import com.module.app.arouter.service.IMyService;
import com.module.app.widget.share.ShareLayoutType;
import com.module.app.widget.share.bean.Share;
import com.module.base.utils.CommonUtils;
import com.module.base.utils.ToastUtils;
import com.bisinuolan.app.base.bsnl_share.ShareDialog;
import com.bisinuolan.app.base.bsnl_share.annotation.ShareType;
import com.bisinuolan.app.base.bsnl_share.listener.ShareButtonListener;
import com.module.third.bean.IThirdType;

public class JumpUtils {
    public static void jump(Context context, @IThirdType.IJump int jump, Object object) {
        IMyService mIMyService = ArouterUtils.getMyService();
        switch (jump) {
            case IThirdType.IJump.INVITE:
                ShareDialog.Builder(context)
                        .setLayoutType(ShareLayoutType.TYPE_NORMAL)
                        .setLayoutData(new Share("私人空间-加密隐私", "加密安全，保护您的隐私。", ConfigBean.getInstance().getQrCode()))
                        .setShareButtonListener(new ShareButtonListener() {
                            @Override
                            public void onClick(@ShareType int shareType, String text) {
                                if (UserUtils.isLogin()) {
                                    ToastUtils.showLong("邀请口号已复制，请粘贴在聊天框发送出去。");
                                    CommonUtils.copyToClipBoard(context, "邀请你来一起加密图片。\n我的邀请码：【" + UserUtils.getUserId() + "】\n邀请即可获得无门槛优惠券\n(直接复制整段即可)");
                                } else {
                                    ToastUtils.showLong("请登录后，获取邀请口号");
                                }
                            }
                        }).show();
                break;
            default:
                ToastUtils.showShort("当前版本不支持，请更新最新版本看看...");
                break;
        }
    }
}
